xx = foundation[symbol(string(me.spriteNum))].cards.count
if (tableau[symbol(string(sprite(the clickOn).startFrame))].cards[pp].rankvalue = (foundation[symbol(string(me.spriteNum))].cards[xx].rankvalue + 1)) or (tableau[symbol(string(sprite(the clickOn).startFrame))].cards[pp].rankvalue = (foundation[symbol(string(me.spriteNum))].cards[xx].rankvalue - 1)) then
equalvalue = 1
hotcard = me.spriteNum
else
if chars(member(sprite(the clickOn).memberNum).name, 1, 3) = "ace" then
if chars(member(sprite(me.spriteNum).memberNum).name, 1, 4) = "king" then
equalvalue = 1
hotcard = me.spriteNum
else
equalvalue = 0
hotcard = 0
end if
else
if chars(member(sprite(the clickOn).memberNum).name, 1, 4) = "king" then
if chars(member(sprite(me.spriteNum).memberNum).name, 1, 3) = "ace" then
equalvalue = 1
hotcard = me.spriteNum
else
equalvalue = 0
hotcard = 0
end if
else
equalvalue = 0
hotcard = 0
end if
end if
end if
end if
end if
put equalvalue
end
on mouseLeave me
global hotcard, equalvalue, points, win, tableau, foundation, pootimer
equalvalue = 0
hotcard = 0
if points >= (10 * 51) then
win = "yes"
pootimer = timeout("poo").new(100, #gotoit)
points = points + 1000
else
repeat with i = 1 to tableau.count
if tableau[i].cards.count = 0 then
tableau.deleteAt(i)
next repeat
end if
if tableau[i].cards[tableau[i].cards.count].rankvalue = (foundation[symbol(string(me.spriteNum))].cards[foundation[symbol(string(me.spriteNum))].cards.count].rankvalue - 1) then
exit repeat
end if
if tableau[i].cards[tableau[i].cards.count].rankvalue = (foundation[symbol(string(me.spriteNum))].cards[foundation[symbol(string(me.spriteNum))].cards.count].rankvalue + 1) then
exit repeat
end if
if (tableau[i].cards[tableau[i].cards.count].rank = "ace") and (foundation[symbol(string(me.spriteNum))].cards[foundation[symbol(string(me.spriteNum))].cards.count].rank = "king") then
exit repeat
end if
if (tableau[i].cards[tableau[i].cards.count].rank = "king") and (foundation[symbol(string(me.spriteNum))].cards[foundation[symbol(string(me.spriteNum))].cards.count].rank = "ace") then